fix(flow-chat): stabilize pinned turns and viewport diagnostics - #1846
Merged
Conversation
- Preserve protected footer range when users leave pinned turns or tool cards collapse. - Atomically settle semantic anchors to prevent flashes and permanent viewport drops. - Add opt-in bounded Flow Chat diagnostics with local JSONL rotation. - Coalesce diagnostic writes and keep dropped-event sequences ordered. - Add focused regression tests and update settings, locales, and documentation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
flowchat.log.Fixes #
Type and Areas
Type:
Regression fix / feature / test / docs
Areas:
Web UI, desktop/Tauri, configuration, logging, Flow Chat
Motivation / Impact
Pinned user messages could visibly flash or permanently drop after the user
navigated during streaming output. Automatic tool-card collapses could also
release footer compensation before the semantic anchor recovered.
This change gives transferred viewport range an explicit protected lifetime and
settles collapse compensation atomically to the minimum range required to retain
the current scroll position.
For continued investigation, users can enable Flow Chat viewport diagnostics in
logging settings. Diagnostics are disabled by default and write to a separate,
rotated
flowchat.logonly while enabled.Verification
pnpm run lint:webpnpm run type-check:webpnpm run i18n:auditpnpm --dir src/web-ui run test:run src/flow_chat/components/modern/VirtualMessageList.session-boundary.test.tsx src/flow_chat/components/modern/FlowChatViewportCoordinator.test.tspnpm --dir src/web-ui run test:run src/infrastructure/diagnostics/flowChatDiagnostics.test.tscargo check -p bitfun-desktop --testsgit diff --checkManual verification:
Reviewer Notes
app.logging.flow_chat_diagnosticsdefaults tofalse.Checklist